package com.snimay.app.permission.vo;

import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.snimay.heibernate.Annotation.field;
import com.snimay.heibernate.Annotation.table;

/**   
 * @Title      : Permission.java
 * @Package    : com.snimay.users.vo
 * @Description: TODO 
 * @author     : xxy
 * @date       : 2018年4月27日 下午5:44:02
 * @version    : V1.0   
 */
@Entity
@Table(name = "SYS_Permission")
@table(query = "id", name = "权限",size=10)
public class Permission {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long id;

	@field(text="属性",index=1)
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)  
	@JoinColumn(insertable=true,updatable=true,name="Permission")
    public Set<Purl> purl;
	@field(text="属性2",index=1)
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)  
	@JoinColumn(insertable=true,updatable=true,name="Permission")
    public Set<Pdb> pdb;
}
